/*
 * @Descripttion : 年 选择器
 * @Versions     : 0.1
 * @Author       : foxui team
 * @Date         : 2022-03-03 19:52:53
 * @LastEditors  : Please set LastEditors
 * @LastEditTime : 2023-02-28 17:03:44
 */

import { Picker } from './picker';

function Pickeryear() {
    Picker.call(this);
    this.FILL_INPUT_HANDLE = '.foxui-year-picker .foxui-year-table .available';
    this.HANDLE = '.foxui-year-picker .foxui-picker-handle:not(.is-disabled)';
}

Object.setPrototypeOf(Pickeryear.prototype, Picker.prototype);

Pickeryear.prototype._init = function () {
    this._bindToggle();
    this._bindFillInput();
};

Pickeryear.prototype._topHtml = function () {
    return '';
};

Pickeryear.prototype._bodyHtml = function (handle) {
    let inputValue = $(handle).find('input').val();
    return this._bodyYearHtml({ inputValue, year: inputValue });
};

Pickeryear.prototype._bottomHtml = function () {
    return '';
};

let pickeryear = new Pickeryear();

export { pickeryear };
